home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Standards 1994 January / InfoMagic Standards - January 1994.iso / inet / scc / 9215 < prev    next >
Text File  |  1992-05-27  |  9KB  |  190 lines

  1. **************************************************************************
  2. Security Bulletin 9215                  DISA Defense Communications System
  3. May 27, 1992                Published by: DDN Security Coordination Center
  4.                                       (SCC@NIC.DDN.MIL)   1-(800) 365-3642
  5.  
  6.                         DEFENSE  DATA  NETWORK
  7.                           SECURITY  BULLETIN
  8.  
  9.   The DDN SECURITY BULLETIN is distributed by the DDN SCC (Security
  10.   Coordination Center) under DISA contract as a means of communicating
  11.   information on network and host security exposures, fixes, and concerns
  12.   to security and management personnel at DDN facilities.  Back issues may
  13.   be obtained via FTP (or Kermit) from NIC.DDN.MIL [192.112.36.5]
  14.   using login="anonymous" and password="guest".  The bulletin pathname is
  15.   scc/ddn-security-yynn (where "yy" is the year the bulletin is issued
  16.   and "nn" is a bulletin number, e.g. scc/ddn-security-9215).
  17. **************************************************************************
  18. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
  19. !                                                                       !
  20. !     The following important  advisory was  issued by the Computer     !
  21. !     Emergency Response Team (CERT)  and is being relayed unedited     !
  22. !     via the Defense Information Systems Agency's Security             !
  23. !     Coordination Center  distribution  system  as a  means  of        !
  24. !     providing  DDN subscribers with useful security information.      !
  25. !                                                                       !
  26. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
  27. ===========================================================================
  28. CA-92:11                        CERT Advisory
  29.                                 May 27, 1992
  30.             SunOS Environment Variables and setuid/setgid Vulnerability
  31. ---------------------------------------------------------------------------
  32.  
  33. The Computer Emergency Response Team/Coordination Center (CERT/CC) has
  34. received information concerning a vulnerability involving environment
  35. variables and setuid/setgid programs under Sun Microsystems Computer
  36. Corporation SunOS.  This vulnerability exists on all Sun architectures
  37. running SunOS 4.0 and higher.
  38.  
  39. In-house and third-party software can also be impacted by this
  40. vulnerability.  For example, the current versions of rnews, sudo,
  41. smount, and npasswd are known to be vulnerable under SunOS.  See the
  42. Description section of this advisory for details of how to identify
  43. software which may be vulnerable.
  44.  
  45. The workaround detailed in this advisory can be used to protect
  46. vulnerable software on SunOS operating system versions for which
  47. patches are unavailable, or for local or third party software which
  48. may be vulnerable.
  49.  
  50. Sun has provided patches for SunOS 4.1, 4.1.1, and 4.1.2 programs
  51. which are known to be impacted by this vulnerability.  They are
  52. available through your local Sun Answer Center as well as through
  53. anonymous ftp from the ftp.uu.net (137.39.1.9) system in the
  54. /systems/sun/sun-dist directory.
  55.  
  56. Fix                     PatchID        Filename            Checksum
  57. login and su            100630-01      100630-01.tar.Z     36269    39
  58. sendmail                100377-04      100377-04.tar.Z     14692   311
  59.  
  60. Note: PatchID 100630-01 contains the international version of
  61. /usr/bin/login.  PatchID 100631-01 contains the domestic version
  62. of /usr/bin/login and is only available from Sun Answer Centers for
  63. sites that use the US Encryption Kit.
  64.  
  65. Please note that Sun will occasionally update patch files.  If you
  66. find that the checksum is different please contact Sun or the CERT/CC
  67. for verification.
  68.  
  69. ---------------------------------------------------------------------------
  70.  
  71. I.   Description
  72.  
  73.      A security vulnerability exists if a set-user-id program changes
  74.      its real and effective user ids to be the same (but not to the
  75.      invoker's id), and subsequently causes a dynamically-linked program 
  76.      to be exec'd.  A similar vulnerability exists for set-group-id programs.
  77.  
  78.      In particular, SunOS /usr/lib/sendmail, /usr/bin/login,
  79.      /usr/bin/su, and /usr/5bin/su are vulnerable to this problem.
  80.  
  81. II.  Impact
  82.  
  83.      Local users can gain unauthorized privileged access to the system.
  84.  
  85. III. Solution
  86.         
  87.      A.  Obtain and install the patches from Sun or from ftp.uu.net following 
  88.          the provided instructions.
  89.  
  90.      B.  The following workaround can be used to protect vulnerable binaries
  91.          for which patches are unavailable for your SunOS version,
  92.          or for local or third party software which may be vulnerable. 
  93.          The example given is a workaround for /usr/lib/sendmail.  
  94.  
  95.          1.  As root, rename the existing version of /usr/lib/sendmail
  96.              and modify the permissions to prevent misuse.
  97.  
  98.              # mv /usr/lib/sendmail /usr/lib/sendmail.dist
  99.              # chmod 755 /usr/lib/sendmail.dist
  100.  
  101.          2.  In an empty temporary directory, create a file wrapper.c
  102.              containing the following C program source (remember to
  103.              strip any leading white-space characters from the #define lines).
  104.  
  105.              /* Start of C program source */
  106.  
  107.              /* Change the next line to reflect the full pathname
  108.                 of the file to be protected by the wrapper code   */
  109.  
  110.              #define COMMAND "/usr/lib/sendmail.dist"
  111.              #define VAR_NAME "LD_"
  112.  
  113.              main(argc,argv,envp)
  114.              int argc;
  115.              char **argv;
  116.              char **envp;
  117.              {
  118.                      register char  **cpp;
  119.                      register char  **xpp;
  120.                      register char   *cp;
  121.  
  122.                      for (cpp = envp; cp = *cpp;) {
  123.                              if (strncmp(cp, VAR_NAME, strlen(VAR_NAME))==0) {
  124.                                      for (xpp = cpp; xpp[0] = xpp[1]; xpp++);
  125.                                      /* void */ ;
  126.                              }
  127.                              else {
  128.                                      cpp++;
  129.                              }
  130.                      }
  131.  
  132.                      execv(COMMAND, argv);
  133.                      perror(COMMAND);
  134.                      exit(1);
  135.              }
  136.              /* End of C program source */
  137.  
  138.          3.  As root, compile the C program source for the wrapper and
  139.              install the resulting binary.
  140.  
  141.              # make wrapper
  142.              # mv ./wrapper /usr/lib/sendmail
  143.              # chown root /usr/lib/sendmail
  144.              # chmod 4711 /usr/lib/sendmail
  145.  
  146.          4.  Steps 1 through 3 should be repeated for other vulnerable
  147.              programs with the appropriate substitution of pathnames and file
  148.              names. The "COMMAND" C preprocessor variable within the C program
  149.              source should also be changed to reflect the appropriate renamed
  150.              system binary.
  151.  
  152. ---------------------------------------------------------------------------
  153. The CERT/CC wishes to thank the following for their assistance: CIAC,
  154. PCERT, and in particular Wietse Venema of Eindhoven University, The
  155. Netherlands, for his support in the analysis of and a workaround for
  156. this problem.  We also wish to thank Sun Microsystems Computer
  157. Corporation for their prompt response to this vulnerability.
  158. ---------------------------------------------------------------------------
  159.  
  160. If you believe that your system has been compromised, contact CERT/CC or
  161. your representative in FIRST (Forum of Incident Response and Security Teams).
  162.  
  163. Internet E-mail: cert@cert.org
  164. Telephone: 412-268-7090 (24-hour hotline)
  165.            CERT/CC personnel answer 7:30 a.m.-6:00 p.m. EST(GMT-5)/EDT(GMT-4),
  166.            on call for emergencies during other hours.
  167.  
  168. Computer Emergency Response Team/Coordination Center (CERT/CC)
  169. Software Engineering Institute
  170. Carnegie Mellon University
  171. Pittsburgh, PA 15213-3890
  172.  
  173. Past advisories, information about FIRST representatives, and other
  174. information related to computer security are available for anonymous ftp
  175. from cert.org (192.88.209.5).
  176.  
  177. ****************************************************************************
  178. *                                                                          *
  179. *    The point of contact for MILNET security-related incidents is the     *
  180. *    Security Coordination Center (SCC).                                   *
  181. *                                                                          *
  182. *               E-mail address: SCC@NIC.DDN.MIL                            *
  183. *                                                                          *
  184. *               Telephone: 1-(800)-365-3642                                *
  185. *                                                                          *
  186. *    NIC Help Desk personnel are available from 7:00 a.m.-7:00 p.m. EST,   *
  187. *    Monday through Friday except on federal holidays.                     *
  188. *                                                                          *
  189. ****************************************************************************
  190.